Concerning the problem that finding community structure in complex network is very complex, a community discovery algorithm based on node similarity was proposed. The basic idea of this algorithm was that node pairs with higher similarity had more posibility to be grouped into the same community. Integrating local and global similarity, it constructed a similarity matrix which each element represents the similarity of a pair of nodes, then merged nodes which have the most similarity to the same community. The experimental results show that the proposed algorithm can get the correct community structure of networks, and achieve better performance than Label Propagation Algorithm (LPA), GN (Girvan-Newman) and CNM (Clauset-Newman-Moore) algorithms in community detection.